package com.jxc.service.impl;

import com.jxc.mapper.RoleMenuMapper;
import com.jxc.pojo.RoleMenu;
import com.jxc.pojo.RoleMenuExample;
import com.jxc.service.RoleMenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleMenuServiceImpl implements RoleMenuService {
    @Resource
    private RoleMenuMapper roleMenuMapper;

    @Override
    public int delRoleMenu(Integer roleId) {
        return roleMenuMapper.delRoleMenu(roleId);
    }

    @Override
    public List<RoleMenu> selectByExample(Integer roleId) {
        RoleMenuExample roleMenuExample = new RoleMenuExample();
        roleMenuExample.createCriteria().andRoleIdEqualTo(roleId);
        return roleMenuMapper.selectByExample(roleMenuExample);
    }
}
